// DocumentProperties.h

#pragma once

using namespace System;
using namespace msclr::com;

namespace DsoFileNET {

	public ref class DocumentProperties
	{
	private:
		ptr<IStorage> storage;
		ptr<IPropertySetStorage> propertyStorage;

		DsoFileNET::SummaryProperties^ summary;

		bool readOnly;
		DsoFileNET::FileOpenOptions options;

	public:
		//
		// Ctor/Dtor
		//
		DocumentProperties();
		~DocumentProperties();
	
		//
		// Methods
		//
		void Open(String^ fileName, bool readOnly, FileOpenOptions options);
		void Close(bool saveBeforeClose);
		void Save();

		//
		// Properties
		//
		property bool IsReadOnly { bool get(); }
		property bool IsDirty { bool get(); }
		// SummaryProperties
		property DsoFileNET::SummaryProperties^ SummaryProperties { DsoFileNET::SummaryProperties^ get(); }
		// CustomProperties
		property Object^ CustomProperties { Object^ get(); }
		property Object^ Icon { Object^ get(); }
		property String^ Name { String^ get(); }
		property String^ Path { String^ get(); }
		property bool IsOleFile { bool get(); }
		property String^ ClassId { String^ get(); }
		property String^ ProgId { String^ get(); }
		property String^ OleDocumentFormat { String^ get(); }
		property String^ OleDocumentType { String^ get(); }
	};
}
